
using System;
using System.Collections.Generic;
using System.Linq;

using MonoTouch.Foundation;
using MonoTouch.UIKit;
using MonoTouch.Dialog;

namespace Socialite
{
	public partial class SearchResultsScreen : DialogViewController
	{
		List<Place> _places;

		public SearchResultsScreen (SearchCriteria searchCriteria) : base (UITableViewStyle.Grouped, null, true)
		{
			Root = new RootElement ("Search Results");
			Root.UnevenRows = true;

			_places = new List<Place> ();
			_places.Add (new Place ("Wonder Bar", Location.BostonMA, LocationType.Bar));
			_places.Add (new Place ("Rumor", Location.BostonMA, LocationType.NightClub));
			_places.Add (new Place ("Rise", Location.BostonMA, LocationType.NightClub));
			_places.Add (new Place ("Middlesex", Location.BostonMA, LocationType.NightClub));
			_places.Add (new Place ("Phoenix Landing", Location.BostonMA, LocationType.Bar));
			_places.Add (new Place ("Felt", Location.BostonMA, LocationType.NightClub));
			_places.Add (new Place ("Venu", Location.BostonMA, LocationType.NightClub));
			_places.Add (new Place ("Cure", Location.BostonMA, LocationType.NightClub));
			_places.Add (new Place ("Guilt", Location.BostonMA, LocationType.NightClub));

			Section contentSection = new Section ();

			foreach(Place place in _places)
				contentSection.Add (new PlaceElement(place));

			Root.Add (contentSection);

			//This is how I will control the space between sections...
			this.TableView.SectionFooterHeight = 2;
			this.TableView.SectionHeaderHeight = 2;
		}
	}
}
